<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>我的商场 | 主页</title>
    <jsp:include page="/include/header.jsp"></jsp:include>

</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

    <jsp:include page="/include/nav.jsp"></jsp:include>

    <jsp:include page="/include/menu.jsp"></jsp:include>

    <div class="content-wrapper">
        <section class="content-header">
            <h1>
                用户表单
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-user"></i> 用户管理</a></li>
                <li class="active">${user != null ? "修改" : "添加"}</li>
            </ol>
        </section>

        <section class="content">
            <div class="row">
                <div class="col-md-12">
                    <div class="box box-info">
                        <div class="box-header with-border">
                            <h3 class="box-title">${user != null ? "修改" : "添加"}</h3>
                        </div>
                        <c:if test="${message != null && message != ''}">
                            <div class="callout callout-info">
                                <h4>Tip!</h4>
                                <p>${message}</p>
                            </div>
                        </c:if>
                        <!-- /.box-header -->
                        <!-- form start -->
                        <form action="/saveUser" class="form-horizontal" method="post">
                            <div class="box-body">
                                <input type="hidden" name="id" value="${user.id}" >
                                <div class="form-group">
                                    <label for="inputEmail3" class="col-sm-2 control-label">邮箱</label>

                                    <div class="col-sm-10">
                                        <input type="email" name="email" class="form-control" id="inputEmail3" placeholder="邮箱" value="${user.email}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="inputPassword3" class="col-sm-2 control-label" >密码</label>

                                    <div class="col-sm-10">
                                        <input type="password" name="passWord" class="form-control" id="inputPassword3"
                                               placeholder="密码" value="${user.passWord}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="userName" class="col-sm-2 control-label">用户名</label>

                                    <div class="col-sm-10">
                                        <input type="text" name="userName" class="form-control" id="userName" placeholder="用户名" value="${user.userName}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="phone" class="col-sm-2 control-label">电话号码</label>

                                    <div class="col-sm-10">
                                        <input type="text" name="phone" class="form-control" id="phone" placeholder="电话号码" value="${user.phone}">
                                    </div>
                                </div>
                            </div>
                            <!-- /.box-body -->
                            <div class="box-footer">
                                <button type="button" class="btn btn-default" onclick="history.go(-1)">返回</button>
                                <button type="submit" class="btn btn-info pull-right">提交</button>
                            </div>
                            <!-- /.box-footer -->
                        </form>
                    </div>
                </div>
            </div>
        </section>


    </div>

    <jsp:include page="/include/copyright.jsp"></jsp:include>
</div>

<jsp:include page="include/footer.jsp"></jsp:include>

</body>
</html>
